import Vue from 'vue'
import Router from 'vue-router'



const home = r => require.ensure([], () => r(require('@/views/home/index')), 'index');
const preview = r => require.ensure([], () => r(require('@/views/preview/index')), 'preview');
const textbook = r => require.ensure([], () => r(require('@/views/textbook/index')), 'textbook');

Vue.use(Router)

export default new Router({
	mode:"hash",
	// base: '/dist/',
    routes: [
        {
            path: '/',
            redirect: '/index'
        },
        {
            path: '/index',
            name: 'index',
            component: home
        },
        {
            path: '/preview',
            name: 'preview',
            component: preview
        },
        {
            path: '/textbook',
            name: 'textbook',
            component: textbook
        }
    ]
})
